<template>
  <div>
    <u-button type="primary" size="mini" plain shape="circle">主要按钮</u-button>
    <u-button type="success" size="medium">成功按钮</u-button>
    <u-button type="info">信息按钮</u-button>
    <u-button type="warning">警告按钮</u-button>
    <u-button type="error">危险按钮</u-button>
  </div>
</template>

<script>
  import { getUserInfo } from '@/api/mock'
  import { mapState, mapGetters, mapMutations, mapActions } from 'vuex'
  export default {
    computed: {
      ...mapState({
        token: (state) => state.user.token
      })
    },
    mounted() {
      console.log('[ test ] >', this.theme)
      getUserInfo({ id: 1 }).then((res) => {
        console.log('res', res)
      })
    },
    methods: {
      ...mapMutations({
        SET_TOKEN: 'user/SET_TOKEN'
      }),
      addToken() {
        this.SET_TOKEN(this.token + 1)
      }
    }
  }
</script>

<style lang="scss" scoped>
  .test {
    display: flex;
    width: 100px;
    color: $theme-color;
  }
</style>
